/*
 * lib2Desa - Another 2D game library in C++
 * Copyright (C) 2009 Erivaldo Xavier de Lima Filho
 *
 * This program is free software and is distributed under GNU General Public License version 3. You can modify and/or redistribute
 * it under the terms of GPL version 3 or posterior version. This program comes with NO WARRANTY, for more details, see LICENSE,
 * or <http://www.gnu.org/licenses>.
 *
 * Contact info:
 *
 *	Erivaldo Xavier de Lima Filho, desadoc@gmail.com
 *
 */

#ifndef _SDL_GRAPHICDEVICE_HPP
#define _SDL_GRAPHICDEVICE_HPP

#include "Core/IGraphicDevice.hpp"
#include "Core/ISprite.hpp"

#ifndef _NO_NAMESPACE
namespace lib2Desa {
#endif

namespace SDL {

class GraphicDeviceIn;

class GraphicDevice : public IGraphicDevice
{

private:

	GraphicDeviceIn* in;
	Color clearColor;

	void deInit(void);

public:

	GraphicDevice(void);
	~GraphicDevice(void);

	bool initScreen(u16 width, u16 height);

	void refreshScreen(void);
	void setClearColor(Color c);
	void clearScreen(void);

	shared_ptr<ISprite> load(const char* filename) const;

	void drawSprite(const shared_ptr<ISprite>& s, const vector2f& pos = vector2f()) const;
};

}

#ifndef _NO_NAMESPACE
}
#endif

#endif /*SDL/GraphicDevice.hpp included*/
